import App from './App'

// #ifndef VUE3
import Vue from 'vue'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
    ...App,store
})
app.$mount()

import store from 'store'
Vue.prototype.$store=store;

//权限跳转
Vue.prototype.navigateTo=(options)=>{
	if(!store.state.user.loginStatus){
		uni.showToast({
			title:"请先登录",
			icon:'none'
		})
		return uni.navigateTo({
			url:"/pages/login/login"
		})
	}
	uni.navigateTo(options)
}



// #endif
import {Request} from './common/api/request.js'
Vue.prototype.$Request= Request
// #ifdef VUE3
import { createSSRApp } from 'vue'

export function createApp() {
  const app = createSSRApp(App)
  return {
    app,
	store
  }
}
// #endif